import React from 'react';
import { Layout, Menu } from 'antd';
import S from '../pages/home/index.less';
const { Header, Content } = Layout;
import { history } from 'umi';

class Index extends React.Component {
  render() {
    return (
      <Layout className={S.logo}>
        <Header>
          <div className={S.logo} />
          <Menu theme="dark" mode="horizontal" defaultSelectedKeys={['2']}>
            <Menu.Item
              key="1"
              onClick={() =>
                history.push({
                  pathname: 'money',
                })
              }
            >
              操作金额
            </Menu.Item>
            <Menu.Item
              key="2"
              onClick={() =>
                history.push({
                  pathname: 'info',
                })
              }
            >
              个人信息
            </Menu.Item>
            <Menu.Item
              onClick={() => {
                history.replace('/');
              }}
            >
              退出登录
            </Menu.Item>
          </Menu>
        </Header>
        <Content>
          <div className={S.siteLayoutContent}>{this.props.children}</div>
        </Content>
      </Layout>
    );
  }
}

export default Index;
